<script setup lang="ts">
import { reactive, onMounted } from "vue";
import api from "@/api/blog/record";

let state = reactive({
    list: [] as any,
    colorArr: ["var(--c-bg-box)"],
    height: "71px",
    activeIndex: -1,
});
onMounted(() => {
    getList();
});
const getList = async () => {
    const res = await api.getlist(null);
    state.list = res.data.reverse();
};
</script>
<template>
    <div class="reacord-warp">
        <el-timeline>
            <el-timeline-item v-for="(item, index) in state.list" type="primary" :hollow="true" :key="index" :timestamp="item.createTime" placement="top">
                <el-card>
                    {{ item.content }}
                </el-card>
            </el-timeline-item>
        </el-timeline>
    </div>
</template>
<style lang="scss" scoped>
.reacord-warp {
    padding: 0 20px;
}
</style>
